﻿CREATE TABLE [app].[UserRoleMap] (
    [Id]              BIGINT   IDENTITY (1, 1) NOT NULL,
    [UserId]          BIGINT   NOT NULL,
    [RoleId]          BIGINT   NOT NULL,
    [CreatedDateTime] DATETIME NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_UserRoleMap_Roles] FOREIGN KEY ([RoleId]) REFERENCES [app].[Roles] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    CONSTRAINT [FK_UserRoleMap_Users] FOREIGN KEY ([UserId]) REFERENCES [app].[Users] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);



